package com.chuan.thinkingjava.think1;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;

import org.apache.log4j.Logger;
import org.omg.CORBA.INTERNAL;

public class Test4 {
	private static Logger logger = Logger.getLogger(Test4.class);
	
	public static void main(String[] args) {
		Collection<Integer> collection = new ArrayList<Integer>();
		Integer[] moreInts = {6,7,8,9,10};
		collection.addAll(Arrays.asList(moreInts));
		logger.debug(collection);
		Collections.addAll(collection, 11,12,13,14,15);
		Collections.addAll(collection, moreInts);
		List<Integer> list = Arrays.asList(16,17,18,19);
		list.set(1, 99);
		logger.debug(list.indexOf("12"));
		logger.debug(list);
		logger.debug(collection);
		
		Arrays.asList(new Test1(),new Test2());
		testMethod1("1");
		
		Random random = new Random(47);
		logger.debug(random);
	}
	
	private static <T> Integer testMethod1(T... a){
		return a.length;
	}
}
